//
//  HitEffect.m
//  
//
//  Created by Gabriel Lumbi on 12-09-22.
//
//

#import "Effect.h"

@implementation Effect

@synthesize over;

#pragma mark -
#pragma mark Life Cycle

-(id) init
{
    if(self = [super init])
    {
        self.over = YES;
        lifespan = 0.4f;
        [self scheduleUpdate];
    }
    return self;
}

#pragma mark -
#pragma mark Update

-(void) update: (ccTime)deltaTime
{
    currentTime += deltaTime;
    if(currentTime > lifespan){
        self.over = YES;
        currentTime = 0;
    }
}

#pragma mark -
#pragma mark Methods

-(void) play{
    currentTime = 0.f;
    self.over = NO;
}

@end
